import React, { useState } from 'react'
import { Modal, Steps } from 'antd';
import "../login.module.css"
import SetTime from './setTime'
import Account from './Account'
import IPaddress from './IPaddress'
const Register = ({setIsRegister,current,setCurrent}) => {
  
    
   

   
    return (
        <>
            <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '30vh' }}>
                <div style={{ width: 800 }}>
                    <Steps current={current}>
                        <Steps.Step key={0} title="设置服务器时间" />
                        <Steps.Step key={1} title="设置IP地址" />
                        <Steps.Step key={2} title="注册酒店账号" />
                    </Steps>
                </div>


            </div>
            <div style={{ height: '50vh', margin: "0 auto", maxWidth: 800}}>
                {current === 0 && <SetTime setCurrent={setCurrent} />}
                {current === 1 && <IPaddress setCurrent={setCurrent} />}
                {current === 2 && <Account setIsRegister={setIsRegister}  />}
            </div>

        </>
    )
}


export default Register